﻿CREATE PROCEDURE [dbo].[proc_Finance_RunningAccount_GetList_PaymentTypeIdCount]
	(
		@CompanyId int,
		@StartDate nvarchar(10),
		@EndDate nvarchar(10),
		@PaymentTypeId int
	)
AS
	
	Select Count(Id) From Finance_RunningAccount As R
	Where (@CompanyId=0 Or R.CompanyId=@CompanyId)  and (@PaymentTypeId=0 Or R.PaymentTypeId=@PaymentTypeId) 
	and Convert(nchar(10),R.CreateDate,120) between @StartDate and @EndDate
	RETURN
